package com.dehui.traders.ui.setting;

import android.content.Context;
import android.databinding.ObservableField;
import android.widget.TextView;

import com.dehui.traders.R;
import com.dehui.traders.widgets.BaseViewHolder;
import com.dehui.traders.widgets.CommonAdapter;

import java.util.Arrays;

import me.goldze.mvvmhabit.base.BaseViewModel;

public class KLineSettingViewModel extends BaseViewModel{


    private String[] klines = new String[]{"成交量","MACD","KDJ","RSI"};

    public CommonAdapter klineSettingListAdapter = new CommonAdapter<String>(context, Arrays.asList(klines),
            R.layout.list_item_kline_setting){

        @Override
        public void convert(BaseViewHolder helper, String item, int position) {
            TextView tvTitle = helper.getView(R.id.tv_title);
            tvTitle.setText(item);
        }
    };


    public ObservableField<CommonAdapter> KLineSettingAdapterObservable = new ObservableField<>(klineSettingListAdapter);


    public KLineSettingViewModel(Context context) {
        super(context);
    }
}
